import { Select } from 'antd'
import useChannel from '@/hooks/channel.js'
const { Option } = Select

export default function Channel (props) {
  const channels = useChannel()
  return (
    <Select {...props} placeholder="请选择频道" style={{ width: 200 }}>
      {channels.map((item) => (
        <Option key={item.id} value={item.id}>
          {item.name}
        </Option>
      ))}
    </Select>
  )
}
